#ifndef __FOREIGN_REFERED_CONSTRAINT_H__
#define __FOREIGN_REFERED_CONSTRAINT_H__

#include <string>
#include <any>

#include "constraint.h"

// 主键：非空 且 唯一
class ForeignReferedConstraint: public Constraint {

public:
    ForeignReferedConstraint(const std::string& attributeName, const std::string& constraintName, const std::string& referenceTableName, const std::string& referenceAttributeName);

    std::string GetReferenceTableName() const;

    void SetReferenceTableName(const std::string& referenceTableName);
    
    std::string GetReferenceAttributeName() const;

    void SetReferenceAttributeName(const std::string& referenceAttributeName);

private:
    std::string _referenceTableName;
    std::string _referenceAttributeName;

};

#endif // __FOREIGN_KEY_CONSTRAINT_H__
